]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ibusCandidatePopup: Use click gesture to activate candidates
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 8 Oct 2025 17:58:40 +0000 (19:58 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 5 Nov 2025 10:33:55 +0000 (11:33 +0100)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3912>

js/ui/ibusCandidatePopup.js

index 2b0d4c27cd017982d6e860e8a3089cb70d1c1148..eb185625f2ccf0e58d9df3f85e6e3327b5e1dff2 100644 (file)
@@ -48,10 +48,12 @@ const CandidateArea = GObject.registerClass({
             this.add_child(box);
 
             const j = i;
-            box.connect('button-release-event', (actor, event) => {
-                this.emit('candidate-clicked', j, event.get_button(), event.get_state());
-                return Clutter.EVENT_PROPAGATE;
+            const clickGesture = new Clutter.ClickGesture();
+            clickGesture.connect('recognize', gesture => {
+                this.emit('candidate-clicked', j, gesture.get_button(),
+                    gesture.get_state());
             });
+            box.add_action(clickGesture);
         }
 
         this._buttonBox = new St.BoxLayout({style_class: 'candidate-page-button-box'});